package com.coke.spring.sentinel.common.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author cwm
 * @Description TODO
 * @date 2021/8/31 下午5:08
 * @Version 1.0
 */
@Configuration
public class Mywebconfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new SentinelInterceptors()).addPathPatterns("/**");
    }
}
